home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / SMC16 / OEMSETUP.INF < prev    next >
Encoding:
INI File  |  1996-07-31  |  46.1 KB  |  1,421 lines

  1. ;
  2. ; 5/30/96  v 3.03a 
  3. ;
  4. ; Windows NT 4.0 .inf file 
  5. ;
  6. ; SMC Ethernet (8416, 8216, 8013, MCA, etc..,) 
  7. ;
  8.  
  9. [Identification]
  10.     OptionType = NetAdapter
  11. [PlatformsSupported]
  12.     MCA     
  13.     ISA
  14.     EISA
  15.     "Jazz-Internal Bus"
  16. [Options]
  17.     SMC8416
  18.     SMC8216
  19.     SMC8013
  20.     SMC8003
  21.  
  22. [CardInfo]
  23. SMCISA = 0, 0, smcisa, 0
  24.  
  25. [FileConstants]
  26. ParamInf        = "NCPARAM.INF"
  27. UtilityInf      = "UTILITY.INF"
  28. subroutineinf   = "SUBROUTN.INF"
  29. SoftwareType    = "driver"
  30. Exit_Code       = 0
  31. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  32. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  33. CardList = ^(CardInfo,0)
  34. Card1ByteList = ^(CardInfo, 1)
  35. Card2ByteList = ^(CardInfo, 2)
  36. CardRuleList = ^(CardInfo, 3)
  37. CardIDList = ^(CardInfo, 4 )
  38. Card1Byte = *($(Card1ByteList), ~($(CardList), $(Option)))
  39. Card2Byte = *($(Card2ByteList), ~($(CardList), $(Option)))
  40. NETCARD_ID = *($(CardIDList), ~($(CardList), $(Option)))
  41. CardRule = *($(CardRuleList), ~($(CardList), $(Option)))
  42.  
  43. EthernetCards  = { SMCISA }
  44.  
  45. TokenRingCards = { WD8115TR }
  46. Manufacturer    = "SMC"
  47. ProductMajorVersion     = "3"
  48. ProductMinorVersion     = "0"
  49. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  50. ProductSoftwareName     = "SMC8000N"
  51. ProductSoftwareImagePath = "%SystemRoot%\System32\drivers\smc8000n.sys"
  52. NetRuleSoftwareType     = "smc8000nSys ndisDriver smc8000nDriver"
  53. NetRuleSoftwareUse      = $(SoftwareType)
  54. NetRuleSoftwareBindForm = """Smc8000nDriver"" yes no container"
  55. NetRuleSoftwareClass    = {"smc8000nDriver basic"}
  56. ProductHardwareName     = $(Option)
  57. ;NetRuleHardwareType     = "smcisa smcisaAdapter"
  58. NetRuleHardwareType     = $(CardRule)" "$(CardRule)"Adapter"
  59. NetRuleHardwareTypeMCA  = $(CardRule)" "$(CardRule)"Adapter"
  60. NetRuleHardwareBindForm = " yes yes container"
  61. ;NetRuleHardwareClass    = {"smcisaAdapter basic"}
  62. NetRuleHardwareClass    = {""$(CardRule)"Adapter basic"}
  63. NetRuleHardwareClassMCA = {""$(CardRule)"Adapter basic"}
  64. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  65. ParamKeyName    = $(!NTN_ServiceBase)$(ProductHardwareName)"\Parameters"
  66. [GeneralConstants]
  67. from      = ""
  68. to        = ""
  69. ExitCodeOk     = 0
  70. ExitCodeCancel = 1
  71. ExitCodeFatal  = 2
  72. KeyNull         = ""
  73. MAXIMUM_ALLOWED   = 33554432
  74. RegistryErrorIndex = NO_ERROR
  75. KeyProduct      = ""
  76. KeyParameters   = ""
  77. TRUE            = 1
  78. FALSE           = 0
  79. NoTitle            = 0
  80. ExitState   = "Active"
  81. OldVersionExisted = $(FALSE)
  82. DriverPath      = $(!STF_NTPATH)\drivers
  83.  
  84. [SmcIrqs]
  85.     IRQ0 = "3",3
  86.     IRQ1 = "5",5
  87.     IRQ2 = "7",7
  88.     IRQ3 = "9",9
  89.     IRQ4 = "10",10
  90.     IRQ5 = "11",11
  91.     IRQ6 = "15",15
  92.  
  93. [SmcIoBase]
  94.     Base0  = "0x300",0x0300
  95.     Base1  = "0x200",0x0200
  96.     Base2  = "0x220",0x0220
  97.     Base3  = "0x240",0x0240
  98.     Base4  = "0x260",0x0260
  99.     Base5  = "0x280",0x0280
  100.     Base6  = "0x2A0",0x02A0
  101.     Base7  = "0x2C0",0x02C0
  102.     Base8  = "0x2E0",0x02E0
  103.     Base9  = "0x320",0x0320
  104.     Base10 = "0x340",0x0340
  105.     Base11 = "0x360",0x0360
  106.     Base12 = "0x380",0x0380
  107.     Base13 = "0x3A0",0x03A0
  108.     Base14 = "0x3C0",0x03C0
  109.     Base15 = "0x3E0",0x03E0
  110.  
  111. [SmcMemAddr]
  112.     MemAddr0 = "IOMapped",IOMapped
  113.     MemAddr0 = "0xC0000",0xC0000
  114.     MemAddr0 = "0xC2000",0xC2000
  115.     MemAddr0 = "0xC4000",0xC4000
  116.     MemAddr0 = "0xC6000",0xC6000
  117.     MemAddr0 = "0xC8000",0xC8000
  118.     MemAddr0 = "0xCA000",0xCA000
  119.     MemAddr0 = "0xCC000",0xCC000
  120.     MemAddr0 = "0xCE000",0xCE000
  121.     MemAddr0 = "0xD0000",0xD0000
  122.     MemAddr0 = "0xD2000",0xD2000
  123.     MemAddr0 = "0xD4000",0xD4000
  124.     MemAddr0 = "0xD6000",0xD6000
  125.     MemAddr0 = "0xD8000",0xD8000
  126.     MemAddr0 = "0xDA000",0xDA000
  127.     MemAddr0 = "0xDC000",0xDC000
  128.     MemAddr0 = "0xDE000",0xDE000
  129. [date]
  130.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  131. [Identify]
  132.     read-syms Identification
  133.     set Status     = STATUS_SUCCESSFUL
  134.     set Identifier = $(OptionType)
  135.     set Media      = #("Source Media Descriptions", 3, 1)
  136.     Return $(Status) $(Identifier) $(Media)
  137. [ReturnOptions]
  138.     set Status        = STATUS_FAILED
  139.     set OptionList     = {}
  140.     set OptionTextList = {}
  141.     set LanguageList = ^(LanguagesSupported, 1)
  142.     Ifcontains(i) $($0) in $(LanguageList)
  143.     ifstr(i) $($1) == ""
  144.        goto returnoptions
  145.     endif
  146.     set PlatformList = ^(PlatformsSupported, 1)
  147.     Ifcontains(i) $($1) in $(PlatformList)
  148.        goto returnoptions
  149.     else
  150.        set Status = STATUS_NOTSUPPORTED
  151.        goto finish_ReturnOptions
  152.     endif
  153.     else
  154.     set Status = STATUS_NOLANGUAGE
  155.     goto finish_ReturnOptions
  156.     endif
  157. returnoptions = +
  158.     set OptionList     = ^(Options, 1)
  159.  
  160.     ifstr(i) $(!NTN_InstallMode) == Update
  161.     set OptionList = >($(OptionList),SMCISA)
  162.     endif
  163.     set OptionTextList = ^(OptionsText$($0), 1)
  164.     set Status         = STATUS_SUCCESSFUL
  165. finish_ReturnOptions = +
  166.     Return $(Status) $(OptionList) $(OptionTextList)
  167. [InstallOption]
  168.  
  169.     set JOption   = $($1)
  170.  
  171.     set Option = SMCISA
  172.  
  173.     set SrcDir   = $($2)
  174.     set AddCopy  = $($3)
  175.     set DoCopy   = $($4)
  176.     set DoConfig = $($5)
  177.     set LanguageList = ^(LanguagesSupported, 1)
  178.  
  179.     ; The following lines were to set the dllpath properly
  180.     ; in NT 3.51, they are not needed in NT 4.0
  181.  
  182.     ; Split-String $(!p:AdapterINF) "\" DestList
  183.     ; set Drve = *($(DestList),1)
  184.     ; Split-String $(!STF_WINDOWSSYSPATH) "\" DestList
  185.     ; set RtDrve = *($(DestList),1)
  186.     ; ifstr(i) $(Drve) == $(RtDrve)
  187.     ;    set DLLPATH = $(SrcDir)
  188.     ; else
  189.     ;    set DLLPATH = $(!STF_WINDOWSSYSPATH)
  190.     ; endif
  191.  
  192.     set DLLPATH = $(SrcDir)
  193.  
  194.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  195.     Return STATUS_NOLANGUAGE
  196.     endif
  197.  
  198.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  199.     set-subst LF = "\n"
  200.     read-syms GeneralConstants
  201.     read-syms FileConstants
  202.     Shell $(UtilityInf), GetBindingInfo, "WD"
  203.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  204.     Debug-Output "ShellCode error: cannot get an error string."
  205.     goto ShellCodeError
  206.     endif
  207.     set NetRuleSoftwareBindable = $($R1)
  208.     read-syms DialogConstants$(!STF_LANGUAGE)
  209.     ifstr(i) $(!NTN_Origination) == "NCPA"
  210.     set Continue = $(OK)
  211.     endif
  212.     read-syms FileConstants$(!STF_LANGUAGE)
  213.     detect date
  214.     set-title  $(FunctionTitle)
  215.     set to   = Begin
  216.     set from = Begin
  217.     set CommonStatus = STATUS_SUCCESSFUL
  218.     EndWait
  219. Begin = +
  220.     set ActivateDetection = FALSE
  221.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  222.         set StartLabel = removeadapter
  223.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  224.         set StartLabel = UpgradeSoftware
  225.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  226.         set StartLabel = bindingadapter
  227.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  228.         set CommonStatus = STATUS_REBOOT
  229.         set ActivateDetection = TRUE
  230.         set StartLabel = configureadapter
  231.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  232.             Debug-Output "Cannot configure the DEC 100 driver software."
  233.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  234.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  235.             Debug-Output "ShellCode error: cannot get an error string."
  236.             goto ShellCodeError
  237.         endif
  238.         set Error = $($R0)
  239.         set from = end
  240.         set to = end
  241.         goto nonfatalinfo
  242.     endif
  243.     else
  244.         set StartLabel = installadapter
  245.         set OEM_ABANDON_OPTIONS = {}
  246.         set OEM_ABANDON_SOFTWARE = FALSE
  247.         set OEM_ABANDON_ON = TRUE
  248.         set ActivateDetection = TRUE
  249.     endif
  250.  
  251.     ifstr $(Option) != SMCISA
  252.         goto skipdetection
  253.     endif
  254.  
  255.     Debug-Output "OEMNADWD.INF: =================================================="
  256.     Debug-Output "OEMNADWD.INF: STF_CWDIR is: "$(!STF_CWDIR)
  257.     Debug-Output "OEMNADWD.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  258.     Debug-Output "OEMNADWD.INF: Option is: "$(Option)
  259.     Debug-Output "OEMNADWD.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  260.     Debug-Output "OEMNADWD.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  261.     Debug-Output "OEMNADWD.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  262.     Debug-Output "OEMNADWD.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  263.     Debug-Output "OEMNADWD.INF: =================================================="
  264.     Set DetectedCard = FALSE
  265.  
  266.     Ifstr(i) $(ActivateDetection) != TRUE
  267.     Goto skipdetection
  268.     Endif
  269.     Set TypeList = {{IRQ,IRQ_List,IRQLevel},+
  270.             {IOADDR, IOBaseAddressDecList, IOBaseValue},+
  271.             {MEMADDR, WinBaseAddressDecList, WinBaseValue}}
  272.     Debug-Output "OEMNADWD.INF: Calling Param_BuildTypeLists"
  273.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  274.     Set Status = $($R0)
  275.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  276.     Goto fataldetect
  277.     Endif
  278.     Debug-Output "OEMNADWD.INF: Calling Param_SetDefaults"
  279.  
  280.     Shell $(ParamInf) Param_SetDefaults {}
  281.     Shell $(ParamInf) HexListFromDecList $(IOBaseAddressDecList)
  282.     Set IOBaseAddressHexList = $($R0)
  283.     Shell $(ParamInf) HexListFromDecList $(WinBaseAddressDecList)
  284.     Set WinBaseAddressHexList = $($R0)
  285.     Debug-Output "The !STFNCOPTION is "$(!STF_NCOPTION) 
  286.     Ifstr(i) $(!STF_NCDETECT) == YES
  287.        Ifstr(i) $(!STF_NCOPTION) == $(JOption)
  288.           Set DetectedCard = $(TRUE)
  289.           Debug-Output "OEMNADWD.INF: Setting DetectedCard to TRUE"
  290.        Endif
  291.     Endif
  292. skipdetection =+
  293.     set from = $(fatal)
  294.     set to = $(fatal)
  295.     goto $(StartLabel)
  296. installadapter = +
  297.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  298.     Debug-Output "ProductKeyName= "$(ProductKeyName)
  299.     set OldVerIO = 999
  300.     Ifstr $(KeyProduct) != $(KeyNull)
  301.     CloseRegKey $(KeyProduct)
  302.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  303.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  304.            $(ProductVersion)
  305.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  306.            Debug-Output "ShellCode error: cannot get an error string."
  307.            goto ShellCodeError
  308.        endif
  309.        goto end
  310.     else
  311.        Shell $(UtilityInf), CardExistedDlg
  312.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  313.            Debug-Output "ShellCode error: cannot get an error string."
  314.            goto ShellCodeError
  315.        endif
  316.        ifstr(i) $($R1) != "OK"
  317.            set CommonStatus = STATUS_USERCANCEL
  318.            goto end
  319.        endif
  320.        set OldVersionExisted = $(TRUE)
  321.        set numcinst = 0
  322. findcardnum = +
  323.        set-add numcinst = $(numcinst),1
  324.        set currregloc = "SYSTEM\CurrentControlSet\Services\SMCISA"$(numcinst)
  325.        OpenRegKey $(!REG_H_LOCAL) "" $(currregloc) $(MAXIMUM_ALLOWED) TKey
  326.        ifint $(numcinst) < 5
  327.       Ifstr $(TKey) == $(KeyNull)
  328.          goto findcardnum
  329.       endif
  330.        endif
  331.        
  332.        CloseRegKey $(TKey) 
  333.        set Old_RegBase = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$(numcinst)
  334.        OpenRegKey $(!REG_H_LOCAL) "" $(Old_RegBase) $(MAXIMUM_ALLOWED) PKey
  335.        Ifstr $(PKey) != $(KeyNull)
  336.             Shell $(UtilityInf) FindService, $(PKey)
  337.  
  338.             Ifstr(i) $($R0) == NO_ERROR
  339.             Set KeyParameters = $($R2)
  340.             CloseRegKey $($R1)
  341.             Ifstr $(KeyParameters) != $(KeyNull)
  342.  
  343.                 set ValueName = ""
  344.                 set ValueData = ""
  345.                 set ValueStr  = ""
  346.                 set ValueList = {}
  347.  
  348.                 EnumRegValue $(KeyParameters) ValueList
  349.                 ForListDo $(ValueList)
  350.                 set ValueItem = $($)
  351.                 set ValueName = *($(ValueItem),1)
  352.                 set ValueData = *($(ValueItem),4)
  353.                 Ifstr(i) $(ValueName) == "IOBase"
  354.                     set OldVerIO = $(ValueData)
  355.                 endif
  356.                 EndForListDo
  357.             endif
  358.             endif
  359.        endif
  360.     endif
  361.     endif
  362.  
  363. ;MCA
  364.     CloseRegKey $(PKey)
  365.  
  366.     Ifstr $(Option) != SMCISA
  367.         Goto installproduct
  368.     Endif
  369. detectloop = +    
  370.     Shell $(ParamInf) Param_SetDefaults {}
  371.     set TextStatus = "Setup found no "$(JOption)", using default settings"
  372.     set DetectedIO = ""
  373.     set JError = 1
  374.     ifint $(DetectedCard) != $(TRUE)
  375.        set !STF_NCOPTION = ""
  376.        Shell "" PrepareDetectionDll "smcncdet.dll"
  377.        shell $(ParamInf) Param_DetectCard
  378.        set JError = *($($R0),1)
  379.        ifint $(JError) == 0
  380.           set JIndex = *($($R0),3) 
  381.           set !STF_NCDETCARD = $(JIndex)
  382.           set JAdptr = *($($R0),2)
  383.           ifstr(i) $(JAdptr) == ""
  384.              set JError = 1
  385.           endif
  386.           set !STF_NCOPTION = $(JAdptr)
  387.           ifstr(i) $(!STF_NCOPTION) == "SMCSCND"
  388.              set !STF_NCOPTION = $(JOption)
  389.           endif
  390.        else
  391.           Debug-Output "Param_DetectCard failed with result="$(JError)
  392.        endif
  393.     endif
  394.  
  395.     Debug-Output "OEMNADWD: The JOption is "$(JOption)
  396.     Debug-Output "OEMNADWD: The !STFNCOPTION is "$(!STF_NCOPTION) 
  397.     
  398.     ifstr(i) $(JOption) == $(!STF_NCOPTION)
  399.        shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  400.        ifstr(i) $($R0) == STATUS_SUCCESSFUL
  401.           set DetectedParams = $($R1)
  402.           set TextStatus = "Setup detected an "$(JOption)" and these parameters"
  403.           shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  404.           ForListDo $(DetectedParams)
  405.              set PItem = $($)
  406.              set PLabel = *($(PItem),1)
  407.              set PValue = *($(PItem),2)
  408.              Ifstr(i) $(PLabel) == "IOADDR"
  409.                                 set IOBaseValueDet = $(PValue)
  410.                 set DetectedIO = $(PValue)
  411.              endif
  412.              Ifstr(i) $(PLabel) == "IRQ"
  413.                                 set IRQLevelDet = $(PValue)
  414.              endif
  415.              Ifstr(i) $(PLabel) == "MEMADDR"
  416.                                 set WinBaseValueDet = $(PValue)
  417.              endif
  418.           endForListDo
  419.        else
  420.           Debug-Output "Param_QueryCard Failed, status = "$($R0)
  421.        endif
  422.     else
  423.        ifint $(JError) == 0
  424.           goto detectloop
  425.        endif
  426.     endif
  427.  
  428.     ifint $(DetectedIO) == $(OldVerIO)
  429.         goto detectloop
  430.     endif
  431.  
  432.     Shell $(ParamInf) Param_ControlDetection DTEND
  433.     goto adapteroptions
  434. configureadapter = +
  435.  
  436.     set JOption   = $($1)
  437.     ifstr $(Option) != SMCISA
  438.         goto end
  439.     endif
  440.  
  441.     set TextStatus = "These are the currently configured settings"
  442.  
  443.     set DLLPATH = $(!STF_CWDDIR)
  444.     Ifstr $(KeyProduct) == $(KeyNull)
  445.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  446.     Ifstr $(KeyProduct) == $(KeyNull)
  447.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  448.         goto fatalregistry
  449.     Endif
  450.     Endif
  451.     Debug-Output "INF: Shelling to FindService"
  452.     Shell $(UtilityInf) FindService, $(KeyProduct)
  453.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  454.     Debug-Output "INF: FindService shell failure"
  455.     Goto ShellCodeError
  456.     Endif
  457.     Ifstr(i) $($R0) != NO_ERROR
  458.     Debug-Output "INF: FindService Shell error: "$($R0)
  459.     Goto fatalregistry
  460.     endif
  461.     set KeyParameters = $($R2)
  462.     CloseRegKey $($R1)
  463.     Ifstr $(KeyParameters) == $(KeyNull)
  464.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  465.     Debug-Output "Cannot find component service"
  466.     goto fatalregistry
  467.     endif
  468.     set OldVersionExisted = $(TRUE )
  469.     set ValueName = ""
  470.     set ValueData = ""
  471.     set ValueStr  = ""
  472.     set ValueList = {}
  473.     EnumRegValue $(KeyParameters) ValueList
  474.     ForListDo $(ValueList)
  475.     set ValueItem = $($)
  476.     set ValueName = *($(ValueItem),1)
  477.     set ValueData = *($(ValueItem),4)
  478.     Ifstr(i) $(ValueName) == "Irq"
  479.         set IRQLevel = $(ValueData)
  480.     else-Ifstr(i) $(ValueName) == "IOBase"
  481.         set IOBaseValue = $(ValueData)
  482.     else-Ifstr(i) $(ValueName) == "RamAddress"
  483.         set WinBaseValue = $(ValueData)
  484.     endif
  485.     EndForListDo
  486.  
  487. adaptersetup =+
  488.     Shell $(ParamInf) Param_ParameterConfidence
  489.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  490.     Debug-Output "OEMNADWD.INF: parameter confidence too low to bypass configuration"
  491.     Goto adapteroptions
  492.     Endif
  493.     Ifstr(i) $(DetectedCard) == TRUE
  494.     Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  495.         Goto adapterverify
  496.     Endif
  497.     Endif
  498.     goto adapteroptions
  499. adapteroptions = +
  500.     set from = adapteroptions
  501.     set WinBaseAddress = *($(WinBaseAddressHexList), ~($(WinBaseAddressDecList),+
  502.     $(WinBaseValue)))
  503.     set IOBaseAddress = *($(IOBaseAddressHexList), ~($(IOBaseAddressDecList),+
  504.     $(IOBaseValue)))
  505.  
  506.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  507.  
  508.     ifstr(i) $(WinBaseValue) == "10"
  509.         set Combo3Out = "IOMapped"
  510.         ; set Combo3List = {"IOMapped"}
  511.     endif
  512.  
  513.     ifstr(i) $(WinBaseValue) == "0"
  514.         set Combo3Out = "IOMapped"
  515.         ; set Combo3List = {"IOMapped"}
  516.     endif
  517.     
  518.     ; set Combo2List = {$(IOBaseAddress)}
  519.  
  520.     set EditTextIn = {}
  521.     set NotifyFields   = {NO, NO, NO}
  522.     set EditTextLim    = {12}
  523.     set EditFocusOn    = ""
  524.     ifstr(i) $(DLLPATH) != ""
  525.     Split-String $(DLLPATH) "\" TempList
  526.     QueryListSize ListSize $(TempList)
  527.     ifstr(i) *($(TempList), $(ListSize)) != "\"
  528.         set DLLPATH = $(DLLPATH)"\"
  529.     endif
  530.     endif
  531.  
  532.     SetHelpFile $(DLLPATH)smc8000.hlp 30100 30105
  533.     loadlibrary "SMC 8000 Install Diskette" $(DLLPATH)SMC8000.dll DllHandle
  534.     loadlibrary "SMC 8000 Install Diskette" $(!STF_WINDOWSSYSPATH)\smcncdet.dll DetHandle
  535.  
  536.     ifstr(i) $(StartLabel) == "configureadapter"
  537.        set JOption = "SMC8416"
  538.        set JError = 0
  539.     endif
  540. diaretry = +
  541.     ui start "InputDlg" $(DllHandle)
  542.  
  543.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  544.        ifint $(JError) == 0
  545.        ifstr(i) $(JOption) == "SMC8416"
  546.         ifstr(i) $(IOBaseAddress) != $(Combo2Out)
  547.             set Result = "Clear"
  548.             ifstr(i) $(StartLabel) == "configureadapter"
  549.                 set Result = "Config"
  550.             endif
  551.             Debug-Output "The chosen is diferent from the previous."
  552.             set IODec = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  553.                 $(IOBaseAddress)))
  554.             set ComboDec = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  555.                 $(Combo2Out)))
  556.             Debug-Output "The iobaseaddress is "$(IODec) 
  557.             Debug-Output "The chosen address is "$(ComboDec)
  558.             ifstr(i) $(OldVerIO) == $(ComboDec)
  559.                 set Result = "Used"
  560.             endif
  561.             ifstr(i) $(Result) == "Clear"
  562.                 ifstr(i) $(OldVerIO) != 999
  563.                     Debug-Output "The oldversion io is being given to chkandput: "$(OldVerIO)
  564.                     LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) $(OldVerIO)
  565.                 else
  566.                     LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 
  567.                 endif
  568.             endif
  569.             
  570.             ifstr(i) $(Result) == "Config"
  571.                 shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) WARNING "When restarting your computer, be sure to power off the machine for the new settings to take effect."
  572.                 ifstr(i) $($R1) == "OK"
  573.                     LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 8
  574.                 else
  575.                     ifstr(i) $($R1) == "CANCEL"
  576.                         ui pop 1
  577.                         set Combo2Out = $(IOBaseAddress)
  578.                         goto diaretry
  579.                     endif
  580.                 endif    
  581.             endif
  582.  
  583.             ifstr(i) $(Result) == "Pnpwarn"
  584.                 shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) WARNING "Changing the I/O base will disable PnP on your card."
  585.                 ifstr(i) $($R1) == "OK"
  586.                     shell $(subroutineinf) SetupMessage $(!STF_LANGUAGE) WARNING "When restarting your computer, be sure to power off the machine for the new settings to take effect."
  587.  
  588.                     ifstr(i) $($R1) == "OK"
  589.                         ifstr(i) $(StartLabel) == "configureadapter"
  590.                             LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 6
  591.                         else
  592.                             LibraryProcedure Result $(DetHandle) ChkAndPut $(ComboDec) $(IODec) 7
  593.                         endif
  594.                     endif
  595.                  endif
  596.                  ifstr(i) $($R1) == "CANCEL"
  597.                     ui pop 1
  598.                     set Combo2Out = $(IOBaseAddress)
  599.                     goto diaretry
  600.                  endif
  601.             endif
  602.  
  603.             ifstr(i) $(Result) == "Used"
  604.                 set TextStatus = "That i/o address is taken, choose another"
  605.                 ui pop 1
  606.                 goto diaretry
  607.             endif
  608.           endif     ; end for if the iorange is diferent 
  609.           endif     ; end for if it is an 8416 
  610.         endif       ; end for if the JError is 0 (a detected card)
  611.         ui pop 1
  612.         freelibrary $(DllHandle)
  613.         freelibrary $(DetHandle)
  614.         set IRQLevel = $(Combo1Out)
  615.         set IOBaseAddress = $(Combo2Out)
  616.         set WinBaseAddress = $(Combo3Out)
  617.     else-ifstr(i) $(DLGEVENT) == "BACK"
  618.         set CommonStatus = STATUS_USERCANCEL
  619.         Debug-Output "Action: exit. Bye."
  620.         ui pop 1
  621.         freelibrary $(DllHandle)
  622.         freelibrary $(DetHandle)
  623.         goto end
  624.     else
  625.         ui pop 1
  626.         freelibrary $(DllHandle)
  627.         freelibrary $(DetHandle)
  628.         Debug-Output "Action: unknown. Bye."
  629.         goto end
  630.     endif
  631.  
  632.     set WinBaseValue = *($(WinBaseAddressDecList), ~($(WinBaseAddressHexList),+
  633.     $(WinBaseAddress)))
  634.     set IOBaseValue = *($(IOBaseAddressDecList), ~($(IOBaseAddressHexList),+
  635.     $(IOBaseAddress)))
  636.     
  637. adapterverify =+
  638.     Ifstr(i) $(DetectedCard) != TRUE
  639.         Goto skipoptions
  640.     Endif
  641.     Debug-Output "OEMNADWD.INF: Calling Param_VerifyCard"
  642.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  643.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  644.     Debug-Output "OEMNADWD.INF: Param_VerifyCard succeeded"
  645.     Goto skipoptions
  646.     Endif
  647.     Set from = adapteroptions
  648.     Set to = skipoptions
  649.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  650.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  651.     Debug-Output "ShellCode error: cannot get an error string."
  652.     goto ShellCodeError
  653.     endif
  654.     set Error = $($R0)
  655.     Goto Warning
  656.  
  657. ;MCA
  658.  
  659. installproduct = +
  660.  
  661.     StartWait
  662.  
  663.     Shell $(UtilityInf), MCAFindBus, $(Card1Byte), $(Card2Byte)
  664.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  665.         goto ShellCodeError
  666.     endif
  667.     ifstr $($R0) != "NO_ERROR"
  668.         set Error = $($R0)
  669.     goto fatal
  670.     endif
  671.     ifstr(i) $($R1) == {}
  672.         set Error = $(CANNOT_FIND_ANY_CARD)
  673.         set CommonStatus = STATUS_USERCANCEL
  674.         set from = "end"
  675.         goto nonfatal
  676.     endif
  677.     set AdapterList = $($R1)
  678.  
  679. ;       goto mcaincluded
  680.  
  681. skipoptions = +
  682.     ifint $(OldVersionExisted) == $(TRUE)
  683.         ifstr(i) $(!NTN_InstallMode) == configure
  684.             ifstr $(Option) == SMCISA
  685.                 goto writeparameters
  686. ;MCA
  687.             else
  688.                 set Error = "Configure: Sorry, not yet implemented."
  689.                 goto fatal
  690.             endif
  691.         endif
  692.     endif
  693.  
  694. mcaincluded = +
  695.     set AdapterList = $($R1)
  696.     ifint $(OldVersionExisted) == $(FALSE)
  697.         ; ifstr(i) $(DLLPATH) == $(SrcDir)
  698.         ifstr(i) $(!NTN_InstallMode) == "install"
  699.            Ifstr(i) $(DoCopy) == "YES"
  700.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  701.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  702.                   Goto ShellCodeError
  703.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  704.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  705.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  706.                       goto ShellCodeError
  707.                   endif
  708.                   set Error = $($R0)
  709.                   Goto fatal
  710.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  711.                   Goto successful
  712.               Endif
  713.               Set SrcDir = $($R1)
  714.            Endif
  715.            install "Install-Option"
  716.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  717.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  718.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  719.                   goto ShellCodeError
  720.               endif
  721.               set Error = $($R0)
  722.               goto fatal
  723.            endif
  724.         endif
  725.         ; endif
  726.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  727.             $(ProductSoftwareName), +
  728.             $(ProductSoftwareName), +
  729.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  730.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  731.             $(NetEventDLL)
  732.         Set OEM_ABANDON_SOFTWARE = TRUE
  733.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  734.             Debug-Output "ShellCode error"
  735.             goto ShellCodeError
  736.         endif
  737.     set RegistryErrorIndex = $($R0)
  738.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  739.         EndWait
  740.         Debug-Output "Registry error: add software components"
  741.         CloseRegKey $($R1)
  742.         CloseRegKey $($R2)
  743.         CloseRegKey $($R3)
  744.         CloseRegKey $($R4)
  745.         CloseRegKey $($R5)
  746.         goto fatalregistry
  747.     endif
  748.     Set SoftProductKey      = $($R1)
  749.     Set SoftNetRuleKey      = $($R2)
  750.     Set SoftServiceKey      = $($R3)
  751.     Set SoftParameterKey    = $($R4)
  752.     Set SoftLinkageKey      = $($R5)
  753.  
  754.     Debug-Output "softlinkage #1 :"$($R5)
  755.  
  756.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  757.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  758.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  759.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  760.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  761.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  762.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  763.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  764.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  765.         Debug-Output "ShellCode error."
  766.         goto ShellCodeError
  767.     endif
  768.     set RegistryErrorIndex = $($R0)
  769.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  770.         EndWait
  771.         Debug-Output "Resgitry error: add value list."
  772.         CloseRegKey $(SoftProductKey)
  773.         CloseRegKey $(SoftNetRuleKey)
  774.         CloseRegKey $(SoftServiceKey)
  775.         CloseRegKey $(SoftParameterKey)
  776.         CloseRegKey $(SoftLinkageKey)
  777.         goto fatalregistry
  778.     endif
  779.  
  780.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  781.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  782.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  783.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  784.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  785.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  786.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  787.  
  788.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  789.         Debug-Output "ShellCode error."
  790.         goto ShellCodeError
  791.     endif
  792.     set RegistryErrorIndex = $($R0)
  793.     CloseRegKey $(SoftProductKey)
  794.     CloseRegKey $(SoftNetRuleKey)
  795.     CloseRegKey $(SoftServiceKey)
  796.     CloseRegKey $(SoftParameterKey)
  797.     CloseRegKey $(SoftLinkageKey)
  798.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  799.         EndWait
  800.         Debug-Output "Resgitry error: add value list."
  801.         goto fatalregistry
  802.     endif
  803.     endif
  804.  
  805.     set BusNum = *($($),1)
  806.  
  807. ;MCA
  808.  
  809.     ifstr $(Option) != SMCISA
  810.         ForListDo $(AdapterList)
  811.             set BusNum = *($($),1)
  812.             set SlotNum = *($($),2)
  813.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  814.             $(SlotNum), $(ProductHardwareDescriptionMCA), $(ProductHardwareName)
  815.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  816.             goto ShellCodeError
  817.         endif
  818.         ifstr $($R0) != "NO_ERROR"
  819.             set Error = $($R0)
  820.             goto fatal
  821.         endif
  822.         ifstr(i) $($R1) != "YES"
  823.         Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  824.         ifint $($R4) != -1
  825.            Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  826.         endif
  827.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  828.             goto ShellCodeError
  829.         endif
  830.         set RegistryErrorIndex = $($R0)
  831.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  832.             EndWait
  833.             CloseRegKey $($R1)
  834.             CloseRegKey $($R2)
  835.             CloseRegKey $($R3)
  836.             goto fatalregistry
  837.         endif
  838.         Set HardNetCardKey      = $($R1)
  839.         Set HardNetRuleKey      = $($R2)
  840.         Set HardParameterKey    = $($R3)
  841.         set AdapterNumber = $($R4)
  842.         set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  843.                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitleMCA)},+
  844.                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescriptionMCA)},+
  845.                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  846.                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  847.                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  848.         Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  849.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  850.             goto ShellCodeError
  851.         endif
  852.         Shell $(UtilityInf), GetBusTypeNum
  853.         set BusTypeNum = $($R1)
  854.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  855.             Debug-Output "ShellCode error."
  856.             goto ShellCodeError
  857.         endif
  858.         IfContains $(Option) in $(EthernetCards)
  859.             set CardMediaType = 1
  860.             set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  861.                        {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(NETCARD_ID)},+
  862.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  863.                        {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  864.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD), $(CardMediaType)}}
  865.         else
  866.             set CardMediaType = 2
  867.             set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  868.                        {McaPosId,$(NoTitle),$(!REG_VT_DWORD),$(NETCARD_ID)},+
  869.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  870.                        {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  871.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD), $(CardMediaType)},+
  872.                        {MaximumPacketSize,$(NoTitle),$(!REG_VT_DWORD), 8192}}
  873.         endif
  874.         Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  875.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  876.             goto ShellCodeError
  877.         endif
  878.         set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  879.         set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  880.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareTypeMCA)},+
  881.                     {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  882.                     {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClassMCA)}, +
  883.                     {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  884.         Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  885.         CloseRegKey $(HardNetCardKey)
  886.         CloseRegKey $(HardNetRuleKey)
  887.         CloseRegKey $(HardParameterKey)
  888.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  889.             goto ShellCodeError
  890.         endif
  891.         endif
  892.         EndForListDo
  893.         EndWait
  894.         goto successful
  895.     endif
  896.  
  897.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  898.     ifint $($R4) != -1
  899.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  900.     endif
  901.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  902.     Debug-Output "Cannot add hardware component"
  903.     goto ShellCodeError
  904.     endif
  905.     set RegistryErrorIndex = $($R0)
  906.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  907.     EndWait
  908.     Debug-Output "Registry error: add hardware component"
  909.     Debug-Output $(RegistryErrorIndex)
  910.     CloseRegKey $($R1)
  911.     CloseRegKey $($R2)
  912.     CloseRegKey $($R3)
  913.     goto fatalregistry
  914.     endif
  915.     set KeyParameters = $($R3)
  916.     set KeyAdapterRules = $($R2)
  917.     set AdapterNumber = $($R4)
  918.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  919.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  920.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  921.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  922.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  923.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  924.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  925.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  926.     Debug-Output "ShellCode error"
  927.     goto ShellCodeError
  928.     endif
  929.     CloseRegKey $($R1)
  930.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  931.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  932.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  933.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  934.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  935.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  936.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  937.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  938.     Debug-Output "ShellCode error."
  939.     goto ShellCodeError
  940.     endif
  941.     set RegistryErrorIndex = $($R0)
  942.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  943.     EndWait
  944.     Debug-Output "Resgitry error: add value list."
  945.     CloseRegKey $(KeyParameters)
  946.     CloseRegKey $(KeyAdapterRules)
  947.     goto fatalregistry
  948.     endif
  949.     CloseRegKey $(KeyAdapterRules)
  950.     goto writeparameters
  951. writeparameters = +
  952.     Shell $(UtilityInf), GetBusTypeNum
  953.     set BusTypeNum = $($R1)
  954.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  955.     Debug-Output "ShellCode error."
  956.     goto ShellCodeError
  957.     endif
  958.     IfContains $(Option) in $(EthernetCards)
  959.     set CardMediaType = 1
  960.     set NewValueList = {+
  961.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  962.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  963.                {IOBase,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  964.                {Irq,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  965.                {RamAddress,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseValue)},+
  966.                {IOBaseDet,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValueDet)},+
  967.                {IrqDet,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevelDet)},+
  968.                {RamAddressDet,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseValueDet)},+
  969.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)}+
  970.                }
  971.     else
  972.     set CardMediaType = 2
  973.     set NewValueList = {+
  974.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  975.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  976.                {IOBase,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseValue)},+
  977.                {Irq,$(NoTitle),$(!REG_VT_DWORD),$(IRQLevel)},+
  978.                {RamAddress,$(NoTitle),$(!REG_VT_DWORD),$(WinBaseAddress)},+
  979.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(CardMediaType)},+
  980.                {MaximumPacketSize,$(NoTitle),$(!REG_VT_DWORD),8192}+
  981.                }
  982.     endif
  983.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  984.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  985.     Debug-Output "ShellCode error."
  986.     goto ShellCodeError
  987.     endif
  988.     set RegistryErrorIndex = $($R0)
  989.     CloseRegKey $(KeyParameters)
  990.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  991.     Debug-Output "Registry error: Add value list"
  992.     goto fatalregistry
  993.     endif
  994.     EndWait
  995.     goto successful
  996. bindingadapter =+
  997.     set Error = "Binding: Sorry, not yet implemented."
  998.     goto fatal
  999. removeadapter = +
  1000.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1001.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1002.         $(ProductSoftwareName)
  1003.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1004.         Debug-Output "ShellCode error"
  1005.         goto ShellCodeError
  1006.     endif
  1007.     set RegistryErrorIndex = $($R0)
  1008.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1009.         goto fatalregistry
  1010.     endif
  1011.     else
  1012.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1013.         $(ProductSoftwareName), $(!NTN_RegBase)
  1014.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1015.         Debug-Output "ShellCode error"
  1016.         goto ShellCodeError
  1017.     endif
  1018.     set RegistryErrorIndex = $($R0)
  1019.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1020.         goto fatalregistry
  1021.     endif
  1022.     endif
  1023.     goto end
  1024. UpgradeSoftware = +
  1025.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  1026.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  1027.     Ifstr $(KeyProduct) != $(KeyNull)
  1028.         GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  1029.         set Version = *($(VersionInfo), 4)
  1030.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  1031.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1032.         Debug-Output "ShellCode error"
  1033.         goto ShellCodeError
  1034.         endif
  1035.         set !UG_Filename = $($R0)
  1036.         ifstr(i) $(!UG_Filename) != ""
  1037.         install "Install-Update"
  1038.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1039.             goto fatal
  1040.         endif
  1041.         endif
  1042.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  1043.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  1044.         ifint $(Version) != $(ProductVersion)
  1045.         endif
  1046.         CloseRegKey $(KeyProduct)
  1047.     else
  1048.         goto fatalregistry
  1049.     endif
  1050.     else
  1051.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  1052.           $(MAXIMUM_ALLOWED) NetworkCardKey
  1053.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  1054.         GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  1055.         set ServiceName = *($(ServiceNameInfo), 4)
  1056.         OpenRegKey $(NetworkCardKey) "" "NetRules" +
  1057.         $(MAXIMUM_ALLOWED) NetRuleKey
  1058.         Ifstr(i) $(NetRuleKey) != $(KeyNull)
  1059.         else
  1060.         goto fatalregistry
  1061.         endif
  1062.         CloseRegKey $(NetRules)
  1063.         CloseRegKey $(NetworkCardKey)
  1064.     else
  1065.         goto fatalregistry
  1066.     endif
  1067.     OpenRegKey $(!REG_H_LOCAL) "" +
  1068.           $(!NTN_ServiceBase)"\"$(ServiceName) +
  1069.           $(MAXIMUM_ALLOWED) ServiceKey
  1070.     Ifstr(i) $(ServiceKey) != $(KeyNull)
  1071.         CloseRegKey $(ServiceKey)
  1072.     else
  1073.         goto fatalregistry
  1074.     endif
  1075.     endif
  1076.  
  1077.  
  1078.     ;
  1079.     ; All I want to do is copy a new driver over the old one
  1080.     ;
  1081.  
  1082.  
  1083.       install "Install-Update"
  1084.  
  1085.       ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1086.       goto fatal
  1087.       endif
  1088.  
  1089.     goto end
  1090. successful = +
  1091.     goto end
  1092. abandon = +
  1093.     ForListDo $(OEM_ABANDON_OPTIONS)
  1094.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  1095.         $(ProductSoftwareName), $($)
  1096.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1097.         Debug-Output "ShellCode error"
  1098.         goto ShellCodeError
  1099.     endif
  1100.     set RegistryErrorIndex = $($R0)
  1101.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1102.         goto fatalregistry
  1103.     endif
  1104.     EndForListDo
  1105.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  1106.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  1107.         $(ProductSoftwareName), FALSE
  1108.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1109.         Debug-Output "ShellCode error"
  1110.         goto ShellCodeError
  1111.     endif
  1112.     set RegistryErrorIndex = $($R0)
  1113.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1114.         goto fatalregistry
  1115.     endif
  1116.     endif
  1117.     goto end
  1118. warning = +
  1119.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  1120.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1121.     goto ShellCodeError
  1122.     endif
  1123.     ifstr(i) $($R1) == "OK"
  1124.     goto $(to)
  1125.     else-ifstr(i) $($R1) == "CANCEL"
  1126.     goto $(from)
  1127.     else
  1128.     goto "end"
  1129.     endif
  1130. nonfatalinfo = +
  1131.     Set CommonStatus = STATUS_USERCANCEL
  1132.     Set Severity = STATUS
  1133.     goto nonfatalmsg
  1134. nonfatal = +
  1135.     Set Severity = NONFATAL
  1136.     goto nonfatalmsg
  1137. nonfatalmsg = +
  1138.     ifstr(i) $(Error) == ""
  1139.     Set Severity = NONFATAL
  1140.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1141.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1142.         goto ShellCodeError
  1143.     endif
  1144.     set Error = $($R0)
  1145.     endif
  1146.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  1147.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1148.     goto ShellCodeError
  1149.     endif
  1150.     ifstr(i) $($R1) == "OK"
  1151.     goto $(from)
  1152.     else
  1153.     goto "end"
  1154.     endif
  1155. fatalregistry = +
  1156.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  1157.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1158.     goto ShellCodeError
  1159.     endif
  1160.     set Error = $($R0)
  1161.     goto fatal
  1162. fataldetect = +
  1163.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  1164.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1165.     Debug-Output "ShellCode error: cannot get an error string."
  1166.     goto ShellCodeError
  1167.     endif
  1168.     set Error = $($R0)
  1169.     Goto fatal
  1170. fatal = +
  1171.     ifstr(i) $(Error) == ""
  1172.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  1173.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1174.         goto ShellCodeError
  1175.     endif
  1176.     set Error = $($R0)
  1177.     endif
  1178.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  1179.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1180.     goto ShellCodeError
  1181.     endif
  1182.     goto setfailed
  1183. ShellCodeError = +
  1184.     set DlgType      = "MessageBox"
  1185.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  1186.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  1187.     set STF_MB_TYPE  = 1
  1188.     set STF_MB_ICON  = 3
  1189.     set STF_MB_DEF   = 1
  1190.     ui start "Error Message"
  1191.     goto setfailed
  1192. setfailed = +
  1193.     set CommonStatus = STATUS_FAILED
  1194.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  1195.     set OEM_ABANDON_ON = FALSE
  1196.     goto abandon
  1197.     endif
  1198.     goto end
  1199. end = +
  1200.     goto term
  1201. term = +
  1202.     Return $(CommonStatus)
  1203. [Install-Option]
  1204.     set STF_VITAL = ""
  1205.     ifstr(i) $(AddCopy) == "YES"
  1206.     AddSectionFilesToCopyList Files-SMCISA $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1207.     AddSectionFilesToCopyList Files-Dll $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1208.     endif
  1209.     ifstr(i) $(DoCopy) == "YES"
  1210.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1211.        CopyFilesInCopyList
  1212.     endif
  1213.     ifstr(i) $(DoConfig) == "YES"
  1214.     endif
  1215.     Exit
  1216. [Install-Update]
  1217.    set STF_VITAL        = ""
  1218.    ;set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  1219.    AddSectionFilesToCopyList Files-SMCISA $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  1220. ;   AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  1221.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  1222.    CopyFilesInCopyList
  1223.    exit
  1224. [Source Media Descriptions]
  1225. ;    1  = "Windows NT Setup Disk #1"  , TAGFILE = disk1
  1226. ;    2  = "Windows NT Setup CD-ROM Disk"  , TAGFILE = disk2
  1227.     3  = "SMC SUPER DISK"     
  1228.  
  1229. [Signature]
  1230.     FileType = MICROSOFT_DRVLIB_FILE
  1231. [GetSignature]
  1232.     read-syms Signature
  1233.     return $(FileType)
  1234.  
  1235. [ProductType]
  1236. STF_PRODUCT  = Winnt
  1237. STF_PLATFORM = I386
  1238. [Files-Inf]
  1239. 3,oemsetup.inf,  SIZE=1000,     RENAME=$(!UG_Filename)
  1240. [Files-SMCISA]
  1241. 3,SMC8000N.SYS , SIZE=36864
  1242.  
  1243. [Files-Dll]
  1244. 3,smc8000.dll, SIZE=40000
  1245. 3,smc8000.hlp, SIZE=40000
  1246.  
  1247. [Files-smcncdet]
  1248. 3, smcncdet.dll, SIZE=40000
  1249. [LanguagesSupported]
  1250.     ENG
  1251. [OptionsTextENG]
  1252.     SMC8416     = "SMC8416 EtherEZ"
  1253.     SMC8216     = "SMC8216 EtherCard Elite16 Ultra"
  1254.     SMC8013     = "SMC8013 EtherCard Elite"
  1255.     SMC8003     = "SMC8003 EtherCard PLUS" 
  1256.  
  1257. [FileConstantsENG]
  1258. ProCaption   = "Windows NT Setup"
  1259. ProCancel    = "Cancel"
  1260. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  1261.            "Are you sure you want to cancel copying files?"
  1262. ProCancelCap = "Network Setup Message"
  1263. ProText1     = "Copying:"
  1264. ProText2     = "To:"
  1265. FunctionTitle   = "SMC Adapter Card Setup"
  1266. ProductSoftwareDescription      = "SMC EtherCard Family Driver"
  1267. ProductHardwareDescription      = "SMC ISA EtherCard Family "
  1268. ProductHardwareDescriptionMCA   = "SMC "$(Option)" EtherCard "
  1269. ProductSoftwareTitle    = "SMC EtherCard Family Driver"
  1270. ProductHardwareTitle    = "SMC EtherCard Family "
  1271. ;ProductHardwareTitleMCA = "SMC Micro Channel Adapter"
  1272. ProductHardwareTitleMCA = $(Option)" EtherCard Plus Elite"
  1273. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  1274. ShellCodeErrorText      = "Shell Code Error."
  1275. [DialogConstantsENG]
  1276. Help        = "&Help"
  1277. Exit        = "Cancel"
  1278. OK          = "OK"
  1279. ContextSMC8000 = 30100
  1280. HelpContext = $(ContextSMC8000)
  1281. Continue    = "Continue"
  1282. Cancel      = "Cancel"
  1283.  
  1284. [FileDependentDlgENG]
  1285.     DlgType           = "RadioCombination"
  1286.     DlgTemplate       = "SMC8000" ; **** This has to be $(Option) *****
  1287.     CaptionSMC8000    = $(JOption)" Ethernet Adapter Card Setup"
  1288.     Caption           = $(CaptionSMC8000)
  1289.     Combo1Label       = "&IRQ Level:"
  1290.     Combo2Label       = "I/O &Base:"
  1291.     Combo3Label       = "&Memory Address:"
  1292.     Label3            = "&Network Address:"
  1293.     IrqList           = ^(SmcIrqs, 1)
  1294.     IoBaseList        = ^(SmcIoBase, 1)
  1295.     MemAddrList       = ^(SmcMemAddr, 1)
  1296.     Combo1List        = $(IrqList)
  1297.     Combo1Out         = $(IRQLevel)
  1298.     Combo2List        = $(IoBaseList)
  1299.     Combo2Out         = $(IOBaseAddress)
  1300.     Combo3List        = $(MemAddrList)
  1301.     Combo3Out         = $(WinBaseAddress)
  1302.     ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  1303.     ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  1304.     CBOptionsGreyed   = {}
  1305.     RCCtlFocusOn      = 403
  1306.  
  1307. [PrepareDetectionDll]
  1308.     read-syms GeneralConstants
  1309.     read-syms FileConstants
  1310.     read-syms FileConstants$(!STF_LANGUAGE)
  1311.  
  1312.     Set NewDllName   = $($0)
  1313.     set SrcDir       = $(!p:SrcDir)
  1314.     Set Status       = STATUS_FAILED
  1315.     Set DllValueName = "NetcardDlls"
  1316.  
  1317.     ifstr(i) $(SrcDir) != ""
  1318.     Split-String $(SrcDir) "\" TempList
  1319.     QueryListSize ListSize $(TempList)
  1320.     ifstr(i) *($(TempList), $(ListSize)) != "\"
  1321.         set SrcDir = $(SrcDir)"\"
  1322.     endif
  1323.     endif
  1324.  
  1325.     OpenRegKey $(!REG_H_LOCAL) "" "System\Setup" $(MAXIMUM_ALLOWED) KeySetup
  1326.     Ifstr(i) $(KeySetup) == $(KeyNull)
  1327.     Debug-Output "System\Setup key is NULL"
  1328.     Goto PDD_Return
  1329.     Endif
  1330.  
  1331.        
  1332.     Set DllFound = 0
  1333.     GetRegValue $(KeySetup) $(DllValueName) DllNamesValue
  1334.     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  1335.     Debug-Output "LastError != Success"
  1336.     Shell $(UtilityInf),RegistryErrorString,$(RegLastError)
  1337.     Shell "" FatalError $($R0)
  1338.     Goto PDD_Return
  1339.     Endif
  1340.  
  1341.     Set DllNames = *($(DllNamesValue),4)
  1342.     Debug-Output "DLL names are: "$(DllNames)
  1343.     ForListDo $(DllNames)
  1344.     Ifstr(i) $($) == $(NewDllName)
  1345.         Set DllFound = 1
  1346.     Endif
  1347.     EndForListDo
  1348.     Ifint $(DllFound) == 0
  1349.         Set DllNames = >($(DllNames),$(NewDllName))
  1350.         Set ValueInfo = {$(DllValueName), $(NoTitle), $(!REG_VT_MULTI_SZ), $(DllNames)}
  1351.         SetRegValue $(KeySetup) $(ValueInfo)
  1352.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1353.             Shell "" SetCopy "YES" $(AddCopy) $(SrcDir) "Install-Detection-Dll"
  1354.  
  1355.             Shell $(ParamInf) Param_ControlDetection DTEND
  1356.             Shell $(ParamInf) Param_ControlDetection DTSTART
  1357.             Set Status = STATUS_SUCCESSFUL
  1358.         Else
  1359.             Shell $(UtilityInf),RegistryErrorString,$(RegLastError)
  1360.             Shell "" FatalError $($R0)
  1361.         Endif
  1362.     Else
  1363.         ; Shell "" SetCopy "YES" $(AddCopy) $(SrcDir) "Install-Detection-Dll"
  1364.         set Status = STATUS_SUCCESSFUL
  1365.     Endif
  1366.     CloseRegKey $(KeySetup)
  1367. PDD_Return = +
  1368.     Debug-Output "Status from PrepareDetectionDll = "$(Status)
  1369.     Return $(Status)
  1370.  
  1371. [Install-Detection-Dll]
  1372.     LibraryProcedure STATUS,$(!LIBHANDLE), CopySingleFile $(SrcDir)"\smcncdet.dll" $(!STF_WINDOWSSYSPATH)"\smcncdet.dll" 
  1373.     exit
  1374.  
  1375. [SetCopy]
  1376.     read-syms GeneralConstants
  1377.     read-syms FileConstants
  1378.     read-syms FileConstants$(!STF_LANGUAGE)
  1379.  
  1380.     set DoCopy = $($0)
  1381.     set AddCopy = $($1)
  1382.     set SrcDir  = $($2)
  1383.     set InstallSection = $($3)
  1384.     set Needcopy = $(FALSE)
  1385.  
  1386.     Ifstr(i) $(DoCopy) == "YES"
  1387.     set NeedCopy = $(TRUE)
  1388.     else-ifstr(i) $(AddCopy) == "YES"
  1389.     set NeedCopy = $(TRUE)
  1390.     else
  1391.     Return $(TRUE)
  1392.     endif
  1393.  
  1394.     set BuiltIn = "YES"
  1395.     ifstr(i) $(!NTN_Origination) == "NCPA"
  1396.     set BuiltIn = "NO"
  1397.     endif
  1398.  
  1399.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) $(BuiltIn)
  1400.  
  1401.     Ifstr(i) $($R0) == STATUS_FAILED
  1402.     Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  1403.     Shell "" FatalError $($R0)
  1404.     Return $(FALSE)
  1405.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  1406.     Return $(FALSE)
  1407.     Endif
  1408.  
  1409.     Set SrcDir = $($R1)
  1410.  
  1411.     install $(InstallSection)
  1412.  
  1413.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  1414.     Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  1415.     Shell "" FatalError $($R0)
  1416.     Return $(FALSE)
  1417.     endif
  1418.  
  1419.     Return $(TRUE)
  1420.  
  1421.